import pandas as pd
import numpy as np

def readData(URL,seed):
    '''
    函数名称：读取CSV数据
    :param URL: CSV文件路径
    :return: 字典存储的data，数据转为Numpy
    '''
    data=pd.read_csv(URL)
    Data={}
    train_Data={}
    test_Data={}
    for key in data.keys():
        np.random.seed(seed)
        Data[key]=np.array(data[key])
        np.random.shuffle(Data[key])
        train_Data[key]=Data[key][:int(Data[key].shape[0]*0.8)]
        test_Data[key] = Data[key][int(Data[key].shape[0] * 0.8):]
    return train_Data,test_Data
